/*
 * @lc app=leetcode.cn id=674 lang=java
 *
 * [674] 最长连续递增序列
 */

// @lc code=start
class Solution {
    public int findLengthOfLCIS(int[] nums) {
        int n = nums.length;

        int[] dp = new int[n];
        for(int i = 0; i < n; i++) {
            dp[i] = 1;
        }

        int res = 1;
        for(int i = 1; i < n; i++) {
            if(nums[i-1] < nums[i]) {
                dp[i] = dp[i-1] + 1;
            }
            if(dp[i] > res) {
                res = dp[i];
            }
        }
        return res;
    }
}
// @lc code=end

